package com.whfc.base.dao;

import com.whfc.base.entity.AppSmsCode;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface AppSmsCodeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AppSmsCode record);

    int insertSelective(AppSmsCode record);

    AppSmsCode selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AppSmsCode record);

    int updateByPrimaryKey(AppSmsCode record);

    /**
     * 查询有效验证码
     *
     * @param phone
     * @param code
     * @return
     */
    AppSmsCode selectByPhoneAndCode(@Param("phone") String phone, @Param("code") String code);

    /**
     * 查询有效验证码
     *
     * @param phone
     * @return
     */
    AppSmsCode selectByPhone(@Param("phone") String phone);
}